import Vue from 'vue'
import VueRouter from 'vue-router'
import FrontDesk from '@/views/FrontDesk/index'
import Layout from '@/layout/index'
import Login from '@/views/Login'
import Home from '@/views/Home'
import Iframe from '@/views/Iframe'
Vue.use(VueRouter)

const routes = [
    {
        path: '/layout',
        component: Layout,
        redirect: '/layout/home',
        children: [
            {
                path: 'home',
                name: 'Home',
                component: Home
            },
            {
                path: 'iframe',
                name: 'Iframe',
                component: Iframe
            },
            {
                path: 'app4' + '*'
            },
            {
                path:'app3' + '*'
            }
        ]
    },
    {
        path: '/',
        component: FrontDesk,
        redirect:'/app1',
        children: [
            {
                path: 'app1' + '*' 
            }
        ]
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    }
]

export default new VueRouter({
    base: process.env.BASE_URL,
    mode: 'history',
    routes
})